import { createStore, applyMiddleware, compose } from "redux";
import { thunk } from "redux-thunk"; // 这将会报错
import reducer from "./reducer";

// 生产环境要关掉，谷歌浏览器redux-devtools插件
const composeEnhancers =
  window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ trace: true }) || compose;

const store = createStore(reducer, composeEnhancers(applyMiddleware(thunk)));

export default store;
